package com.kaifamiao.demo.d0822;

import java.util.ArrayList;
import java.util.List;

public class Player {

    private String name;

    // 是否是地主
    private boolean isLandlord;

    // 手牌
    private List<String> pokers = new ArrayList<>();

    public Player(String name) {
        this.name = name;
    }

    // 抢地主
    public void vie(){}

    // 给手牌
    public void receive(String poker){
        pokers.add(poker);
    }

    // 展示手牌
    public String show(){
        pokers.sort(new PokerComparator());

        return this.name + " 的手牌是： " + pokers.toString();
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString(){
        return show();
    }
}

